

export async function setData(key, value) {
    return new Promise((resolve) => {
        chrome.storage.local.set({ [key]: value }, function () {
            resolve()
        });
    }).catch(() => {

    })


}
export async function getData(key) {
    return new Promise((resolve) => {
        chrome.storage.local.get([key], function (res) {
            resolve(res[key])
        });
    }).catch(() => {

    })


}
// export  function getData1 (key) {
//     return new Promise((resolve)=>{
//         chrome.storage.local.get([key], function (res) {
//             resolve(res)
//         });
//     })

// }
